#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import orm,asyncio
from models import User,Blog,Comment

# async def test(loop):
#     await orm.create_pool(loop,user='root',password='adminroot',db='awesome')
#     u = User(name='Test2',email='test2@example.com',passwd='1234567890',image='about:blank')
#     await u.save()

async def find(loop):
    await orm.create_pool(loop,user='root',password='adminroot',db='awesome')
    rs = await User.findAll()
    print('resault:%s' % rs)

loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.wait([find(loop)]))
loop.run_forever()